import request from '@/utils/http'

export function getMsg(params: any) {
  return request('/api/credit/company_over_view/overview', {
    method: 'POST',
    data: params
  })
}

// 组合事件列表
export async function queryPortfolioEventList(params?: any): Promise<any> {
  return request(`/api/fund/fof/event/queryPortfolioEventList`, {
    method: 'POST',
    data: params
  })
}

// 单基事件列表
export async function queryFundEventList(params?: any): Promise<any> {
  return request(`/api/fund/fof/event/queryFundEventList`, {
    method: 'POST',
    data: params
  })
}

//组合概览持仓基金信息
export function getPositionFundInfoClassify(params: any) {
  return request('/api/fund/position_fund_info/getPositionFundInfoClassify', {
    method: 'POST',
    data: params
  })
}

//组合概览持仓基金事件列表
export function getPositionFundInfoList(params: any) {
  return request('/api/fund/position_fund_info/getPositionFundInfoList', {
    method: 'POST',
    data: params
  })
}

//查询点评
export function portfolio_comment(params: any) {
  return request('/api/fund/portfolio/query/portfolio_comment', {
    method: 'POST',
    data: params
  })
}


//更新点评
export function update_portfolio_comment(params: any) {
  return request('/api/fund/portfolio/save_update/portfolio_comment', {
    method: 'POST',
    data: params
  })
}

//请求事件详情图表
export function queryFundEvent(params: any) {
  return request('/api/fund/fof/event/queryFundEvent', {
    method: 'POST',
    data: params
  })
}

//查询组合的基本信息
export function fof_portfolio_basic(params: any) {
  return request('/api/fund/portfolio/query/fof_portfolio_basic', {
    method: 'POST',
    data: params
  })
}

//查询组合关联基金列表
export function queryPortfolioFundList(params?: any) {
  return request('/api/fund/fof/event/queryPortfolioFundList', {
    method: 'get',
    params
  })
}

//查询事件类型下所有事件
export function queryFundByEventType(params?: any) {
  return request('/api/fund/fof/event/queryFundByEventType', {
    method: 'get',
    params
  })
}

//获得组合与基金净值收益曲线
export function query_profit_and_benchmark(params?: any) {
  return request('/api/fund/portfolio/interval_earnings/profit_and_benchmark', {
    method: 'post',
    data:params
  })
}

// 组合、基准区间收益分析
export function get_main_and_benchmark(params?: any) {
  return request('/api/fund/portfolio/interval_earnings/get_main_and_benchmark', {
    method: 'post',
    data:params
  })
}

// 查询绩效指标
export function get_return_and_risk(params?: any) {
  return request('/api/fund/portfolio/return_and_risk/get_return_and_risk', {
    method: 'post',
    data:params
  })
}

// 获取点评头像
export function queryUserHeadImg(params?: any) {
  return request('/api/admin/sys_user/queryUserHeadImg', {
    method: 'get',
    params,
  })
}

// 上传点评头像
export function uploadUserHeadImg(params?: any) {
  return request('/api/admin/sys_user/uploadUserHeadImg', {
    method: 'get',
  })
}

// 基金概览基金基本信息
export function getFundInfo(params?: any) {
  return request('/api/fund/position_fund_info/getFundInfo', {
    method: 'post',
    data:params
  })
}

// 基金概览基金与基准图表
export function getFundOverview(params?: any) {
  return request('/api/fund/position_fund_info/getFundOverview', {
    method: 'post',
    data:params
  })
}

// 基金概览基金与基准图表
export function fund_detail_list(params?: any) {
  return request('/api/fund/fund_detail_list/demo', {
    method: 'post',
    data:params
  })
}

// 基金概览基金与基准图表
export function fund_detail_list2(params?: any) {
  return request('/api/fund/fund_detail_list/demo2', {
    method: 'post',
    data:params
  })
}

// 基金概览基金与基准图表
export function fund_earnings(params?: any) {
  return request('/api/fund/fund_detail_list/fund_earnings', {
    method: 'post',
    data:params
  })
}

// 组合概览页保存备注
export function saveRemark(params?: any) {
  return request('/api/fund/portfolio_fund_mark/saveRemark', {
    method: 'post',
    data:params
  })
}

// 分析指标
export function analysisIndex(params?: any) {
  return request('/api/fund/position_fund_info/analysisIndex', {
    method: 'post',
    data:params
  })
}
